package com.actionscriptclass.dataholder
{
	import mx.messaging.AbstractConsumer;
	

	internal class RegisterDataHolder 
	{
		private var _mainDataHolder:Object;
		 
		
		public function RegisterDataHolder()
		{
		   _mainDataHolder=new Object();
		} 
		
		public function resetDataHolder():void
		{
			_mainDataHolder=new Object();
		}
		
		internal function addObject(objectName:String):void
		{
		    _mainDataHolder[objectName]=new Array(); 
	  	}
	  
	    internal function addData(linkage:String,arrayHolder:Array):void
		{
		     _mainDataHolder[linkage].push(arrayHolder)
	 	}
	  
	   	public function getValue(linkage:String,prop:String,iteration:uint):*
	    {
	        return _mainDataHolder[linkage][iteration][prop];
	    }
	    
	   public  function getLenght(linkage ):uint
	    { 
	    	var count:uint
	 	   for(var key:Object in  _mainDataHolder[linkage] )
	 	   {
	 	    	count++
	 	   }
 
	 	   return count
	    }
  
	}
}